package com.tc.entity;

import lombok.Getter;
import lombok.Setter;

import java.util.Map;

/**
 * Created by cai.tian on 2017/12/11.
 */
//@JsonInclude(Include.NON_EMPTY)
public class ValidationError {
    /**
     * map of global validation errors
     */
    @Getter
    @Setter
    private Map<String, String> globalErrors;

    /**
     * map of field validation errors *
     * <p>
     * key: the invalid field in the object <BR>
     * value: collection of messages indicating the errors for that field/object.<BR>
     * <p>
     * E.g. A JSON representation of this object looks like this: <BR>
     * {<BR>
     * "user[0].items[0].name": "size must be between 0 and 64" <BR>
     */
    @Getter
    @Setter
    private Map<String, String> fieldErrors;
}
